<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>gen_initial_components [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_matching.html">Matching</a> / <a href="toc_matching_componentbased.html">Component-Based</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">gen_initial_components</span><span data-if="c" style="display:none;">gen_initial_components</span><span data-if="cpp" style="display:none;">GenInitialComponents</span><span data-if="dotnet" style="display:none;">GenInitialComponents</span><span data-if="python" style="display:none;">gen_initial_components</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">gen_initial_components</span><span data-if="c" style="display:none;">gen_initial_components</span><span data-if="cpp" style="display:none;">GenInitialComponents</span><span data-if="dotnet" style="display:none;">GenInitialComponents</span><span data-if="python" style="display:none;">gen_initial_components</span></code> — Extract the initial components of a component model.</p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>gen_initial_components</b>(<a href="#ModelImage"><i>ModelImage</i></a> : <a href="#InitialComponents"><i>InitialComponents</i></a> : <a href="#ContrastLow"><i>ContrastLow</i></a>, <a href="#ContrastHigh"><i>ContrastHigh</i></a>, <a href="#MinSize"><i>MinSize</i></a>, <a href="#Mode"><i>Mode</i></a>, <a href="#GenericName"><i>GenericName</i></a>, <a href="#GenericValue"><i>GenericValue</i></a> : )</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>gen_initial_components</b>(const Hobject <a href="#ModelImage"><i>ModelImage</i></a>, Hobject* <a href="#InitialComponents"><i>InitialComponents</i></a>, const Hlong <a href="#ContrastLow"><i>ContrastLow</i></a>, const Hlong <a href="#ContrastHigh"><i>ContrastHigh</i></a>, const Hlong <a href="#MinSize"><i>MinSize</i></a>, const char* <a href="#Mode"><i>Mode</i></a>, const char* <a href="#GenericName"><i>GenericName</i></a>, double <a href="#GenericValue"><i>GenericValue</i></a>)</code></p>
<p>
<code>Herror <b>T_gen_initial_components</b>(const Hobject <a href="#ModelImage"><i>ModelImage</i></a>, Hobject* <a href="#InitialComponents"><i>InitialComponents</i></a>, const Htuple <a href="#ContrastLow"><i>ContrastLow</i></a>, const Htuple <a href="#ContrastHigh"><i>ContrastHigh</i></a>, const Htuple <a href="#MinSize"><i>MinSize</i></a>, const Htuple <a href="#Mode"><i>Mode</i></a>, const Htuple <a href="#GenericName"><i>GenericName</i></a>, const Htuple <a href="#GenericValue"><i>GenericValue</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>GenInitialComponents</b>(const HObject&amp; <a href="#ModelImage"><i>ModelImage</i></a>, HObject* <a href="#InitialComponents"><i>InitialComponents</i></a>, const HTuple&amp; <a href="#ContrastLow"><i>ContrastLow</i></a>, const HTuple&amp; <a href="#ContrastHigh"><i>ContrastHigh</i></a>, const HTuple&amp; <a href="#MinSize"><i>MinSize</i></a>, const HTuple&amp; <a href="#Mode"><i>Mode</i></a>, const HTuple&amp; <a href="#GenericName"><i>GenericName</i></a>, const HTuple&amp; <a href="#GenericValue"><i>GenericValue</i></a>)</code></p>
<p>
<code><a href="HRegion.html">HRegion</a> <a href="HImage.html">HImage</a>::<b>GenInitialComponents</b>(const HTuple&amp; <a href="#ContrastLow"><i>ContrastLow</i></a>, const HTuple&amp; <a href="#ContrastHigh"><i>ContrastHigh</i></a>, const HTuple&amp; <a href="#MinSize"><i>MinSize</i></a>, const HString&amp; <a href="#Mode"><i>Mode</i></a>, const HTuple&amp; <a href="#GenericName"><i>GenericName</i></a>, const HTuple&amp; <a href="#GenericValue"><i>GenericValue</i></a>) const</code></p>
<p>
<code><a href="HRegion.html">HRegion</a> <a href="HImage.html">HImage</a>::<b>GenInitialComponents</b>(Hlong <a href="#ContrastLow"><i>ContrastLow</i></a>, Hlong <a href="#ContrastHigh"><i>ContrastHigh</i></a>, Hlong <a href="#MinSize"><i>MinSize</i></a>, const HString&amp; <a href="#Mode"><i>Mode</i></a>, const HString&amp; <a href="#GenericName"><i>GenericName</i></a>, double <a href="#GenericValue"><i>GenericValue</i></a>) const</code></p>
<p>
<code><a href="HRegion.html">HRegion</a> <a href="HImage.html">HImage</a>::<b>GenInitialComponents</b>(Hlong <a href="#ContrastLow"><i>ContrastLow</i></a>, Hlong <a href="#ContrastHigh"><i>ContrastHigh</i></a>, Hlong <a href="#MinSize"><i>MinSize</i></a>, const char* <a href="#Mode"><i>Mode</i></a>, const char* <a href="#GenericName"><i>GenericName</i></a>, double <a href="#GenericValue"><i>GenericValue</i></a>) const</code></p>
<p>
<code><a href="HRegion.html">HRegion</a> <a href="HImage.html">HImage</a>::<b>GenInitialComponents</b>(Hlong <a href="#ContrastLow"><i>ContrastLow</i></a>, Hlong <a href="#ContrastHigh"><i>ContrastHigh</i></a>, Hlong <a href="#MinSize"><i>MinSize</i></a>, const wchar_t* <a href="#Mode"><i>Mode</i></a>, const wchar_t* <a href="#GenericName"><i>GenericName</i></a>, double <a href="#GenericValue"><i>GenericValue</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>GenInitialComponents</b>(<a href="HObject.html">HObject</a> <a href="#ModelImage"><i>modelImage</i></a>, out <a href="HObject.html">HObject</a> <a href="#InitialComponents"><i>initialComponents</i></a>, <a href="HTuple.html">HTuple</a> <a href="#ContrastLow"><i>contrastLow</i></a>, <a href="HTuple.html">HTuple</a> <a href="#ContrastHigh"><i>contrastHigh</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinSize"><i>minSize</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Mode"><i>mode</i></a>, <a href="HTuple.html">HTuple</a> <a href="#GenericName"><i>genericName</i></a>, <a href="HTuple.html">HTuple</a> <a href="#GenericValue"><i>genericValue</i></a>)</code></p>
<p>
<code><a href="HRegion.html">HRegion</a> <a href="HImage.html">HImage</a>.<b>GenInitialComponents</b>(<a href="HTuple.html">HTuple</a> <a href="#ContrastLow"><i>contrastLow</i></a>, <a href="HTuple.html">HTuple</a> <a href="#ContrastHigh"><i>contrastHigh</i></a>, <a href="HTuple.html">HTuple</a> <a href="#MinSize"><i>minSize</i></a>, string <a href="#Mode"><i>mode</i></a>, <a href="HTuple.html">HTuple</a> <a href="#GenericName"><i>genericName</i></a>, <a href="HTuple.html">HTuple</a> <a href="#GenericValue"><i>genericValue</i></a>)</code></p>
<p>
<code><a href="HRegion.html">HRegion</a> <a href="HImage.html">HImage</a>.<b>GenInitialComponents</b>(int <a href="#ContrastLow"><i>contrastLow</i></a>, int <a href="#ContrastHigh"><i>contrastHigh</i></a>, int <a href="#MinSize"><i>minSize</i></a>, string <a href="#Mode"><i>mode</i></a>, string <a href="#GenericName"><i>genericName</i></a>, double <a href="#GenericValue"><i>genericValue</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>gen_initial_components</b>(<a href="#ModelImage"><i>model_image</i></a>: HObject, <a href="#ContrastLow"><i>contrast_low</i></a>: MaybeSequence[Union[int, str]], <a href="#ContrastHigh"><i>contrast_high</i></a>: MaybeSequence[Union[int, str]], <a href="#MinSize"><i>min_size</i></a>: MaybeSequence[Union[int, str]], <a href="#Mode"><i>mode</i></a>: str, <a href="#GenericName"><i>generic_name</i></a>: MaybeSequence[str], <a href="#GenericValue"><i>generic_value</i></a>: MaybeSequence[Union[int, float]]) -&gt; HObject</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p>In general, there are two possibilities to use
<code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code>. The first possibility should be
chosen if the components of the component model are not known.  Then
<code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code> automatically extracts the initial
components of a component model from a model image. The second
possibility can be chosen if the components of the component model
are approximately known. Then <code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code> can be
used to find suitable parameter values for the model feature
extraction in <a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a> and
<a href="create_component_model.html"><code><span data-if="hdevelop" style="display:inline">create_component_model</span><span data-if="c" style="display:none">create_component_model</span><span data-if="cpp" style="display:none">CreateComponentModel</span><span data-if="com" style="display:none">CreateComponentModel</span><span data-if="dotnet" style="display:none">CreateComponentModel</span><span data-if="python" style="display:none">create_component_model</span></code></a>.  Hence, the second possibility is
comparable to the function of <a href="inspect_shape_model.html"><code><span data-if="hdevelop" style="display:inline">inspect_shape_model</span><span data-if="c" style="display:none">inspect_shape_model</span><span data-if="cpp" style="display:none">InspectShapeModel</span><span data-if="com" style="display:none">InspectShapeModel</span><span data-if="dotnet" style="display:none">InspectShapeModel</span><span data-if="python" style="display:none">inspect_shape_model</span></code></a> within the
shape-based matching.
</p>
<p>When using the first possibility, <code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code>
extracts the initial components of a component model from a model
image <a href="#ModelImage"><i><code><span data-if="hdevelop" style="display:inline">ModelImage</span><span data-if="c" style="display:none">ModelImage</span><span data-if="cpp" style="display:none">ModelImage</span><span data-if="com" style="display:none">ModelImage</span><span data-if="dotnet" style="display:none">modelImage</span><span data-if="python" style="display:none">model_image</span></code></i></a>. As already mentioned, this is especially
useful if the components of the component model are not known. In
this case, the resulting initial components can be used to
automatically train the component model with
<a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a>, which extracts the (final) model
components and the relations between them.
<code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code> returns the initial components in a
region object tuple <a href="#InitialComponents"><i><code><span data-if="hdevelop" style="display:inline">InitialComponents</span><span data-if="c" style="display:none">InitialComponents</span><span data-if="cpp" style="display:none">InitialComponents</span><span data-if="com" style="display:none">InitialComponents</span><span data-if="dotnet" style="display:none">initialComponents</span><span data-if="python" style="display:none">initial_components</span></code></i></a> that contains a
representation for each initial component in form of contour
regions.
</p>
<p>For the automatic determination of the initial components, the
domain of the model image <a href="#ModelImage"><i><code><span data-if="hdevelop" style="display:inline">ModelImage</span><span data-if="c" style="display:none">ModelImage</span><span data-if="cpp" style="display:none">ModelImage</span><span data-if="com" style="display:none">ModelImage</span><span data-if="dotnet" style="display:none">modelImage</span><span data-if="python" style="display:none">model_image</span></code></i></a> must contain the
entire compound object including all components. <a href="#Mode"><i><code><span data-if="hdevelop" style="display:inline">Mode</span><span data-if="c" style="display:none">Mode</span><span data-if="cpp" style="display:none">Mode</span><span data-if="com" style="display:none">Mode</span><span data-if="dotnet" style="display:none">mode</span><span data-if="python" style="display:none">mode</span></code></i></a>
specifies the method used for the automatic computation.  Currently,
only the mode <i><span data-if="hdevelop" style="display:inline">'connection'</span><span data-if="c" style="display:none">"connection"</span><span data-if="cpp" style="display:none">"connection"</span><span data-if="com" style="display:none">"connection"</span><span data-if="dotnet" style="display:none">"connection"</span><span data-if="python" style="display:none">"connection"</span></i> is available. In this mode the
automatic computation is performed in two steps: In the first step,
features are extracted using the parameters <a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a>,
<a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a>, and <a href="#MinSize"><i><code><span data-if="hdevelop" style="display:inline">MinSize</span><span data-if="c" style="display:none">MinSize</span><span data-if="cpp" style="display:none">MinSize</span><span data-if="com" style="display:none">MinSize</span><span data-if="dotnet" style="display:none">minSize</span><span data-if="python" style="display:none">min_size</span></code></i></a>. These three parameters
define the contours of which the initial components should consist
and should be chosen such that only the significant features of the
model image are contained in the initial components.
<a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a> and <a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a> specify the gray
value contrast of the points that should be contained in the initial
components.  The contrast is a measure for local gray value
differences between the object and the background and between
different parts of the object.  The model image is segmented using a
method similar to the hysteresis threshold method used in
<a href="edges_image.html"><code><span data-if="hdevelop" style="display:inline">edges_image</span><span data-if="c" style="display:none">edges_image</span><span data-if="cpp" style="display:none">EdgesImage</span><span data-if="com" style="display:none">EdgesImage</span><span data-if="dotnet" style="display:none">EdgesImage</span><span data-if="python" style="display:none">edges_image</span></code></a>. Here, <a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a> determines the lower
threshold, while <a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a> determines the upper
threshold. If the same value is passed for <a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a> and
<a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a> a simple thresholding operation is
performed. For more information about the hysteresis threshold
method, see <a href="hysteresis_threshold.html"><code><span data-if="hdevelop" style="display:inline">hysteresis_threshold</span><span data-if="c" style="display:none">hysteresis_threshold</span><span data-if="cpp" style="display:none">HysteresisThreshold</span><span data-if="com" style="display:none">HysteresisThreshold</span><span data-if="dotnet" style="display:none">HysteresisThreshold</span><span data-if="python" style="display:none">hysteresis_threshold</span></code></a>. <a href="#MinSize"><i><code><span data-if="hdevelop" style="display:inline">MinSize</span><span data-if="c" style="display:none">MinSize</span><span data-if="cpp" style="display:none">MinSize</span><span data-if="com" style="display:none">MinSize</span><span data-if="dotnet" style="display:none">minSize</span><span data-if="python" style="display:none">min_size</span></code></i></a> can be
used to select only significant features for the initial components
based on the size of the connected contour regions, i.e., connected
contour regions with fewer than <a href="#MinSize"><i><code><span data-if="hdevelop" style="display:inline">MinSize</span><span data-if="c" style="display:none">MinSize</span><span data-if="cpp" style="display:none">MinSize</span><span data-if="com" style="display:none">MinSize</span><span data-if="dotnet" style="display:none">minSize</span><span data-if="python" style="display:none">min_size</span></code></i></a> points are
suppressed.
</p>
<p>The resulting connected contour regions are iteratively merged in
the second step. For this, two contour regions are merged if the
distance between both regions is smaller than a certain threshold
(see below). Finally, the merged regions are returned in
<a href="#InitialComponents"><i><code><span data-if="hdevelop" style="display:inline">InitialComponents</span><span data-if="c" style="display:none">InitialComponents</span><span data-if="cpp" style="display:none">InitialComponents</span><span data-if="com" style="display:none">InitialComponents</span><span data-if="dotnet" style="display:none">initialComponents</span><span data-if="python" style="display:none">initial_components</span></code></i></a> and can be used to train the component
model by passing them to <a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a>.
</p>
<p>To control the internal image processing, the parameters
<a href="#GenericName"><i><code><span data-if="hdevelop" style="display:inline">GenericName</span><span data-if="c" style="display:none">GenericName</span><span data-if="cpp" style="display:none">GenericName</span><span data-if="com" style="display:none">GenericName</span><span data-if="dotnet" style="display:none">genericName</span><span data-if="python" style="display:none">generic_name</span></code></i></a> and <a href="#GenericValue"><i><code><span data-if="hdevelop" style="display:inline">GenericValue</span><span data-if="c" style="display:none">GenericValue</span><span data-if="cpp" style="display:none">GenericValue</span><span data-if="com" style="display:none">GenericValue</span><span data-if="dotnet" style="display:none">genericValue</span><span data-if="python" style="display:none">generic_value</span></code></i></a> are used. This is
done by passing the names of the control parameters to be changed in
<a href="#GenericName"><i><code><span data-if="hdevelop" style="display:inline">GenericName</span><span data-if="c" style="display:none">GenericName</span><span data-if="cpp" style="display:none">GenericName</span><span data-if="com" style="display:none">GenericName</span><span data-if="dotnet" style="display:none">genericName</span><span data-if="python" style="display:none">generic_name</span></code></i></a> as a list of strings. In <a href="#GenericValue"><i><code><span data-if="hdevelop" style="display:inline">GenericValue</span><span data-if="c" style="display:none">GenericValue</span><span data-if="cpp" style="display:none">GenericValue</span><span data-if="com" style="display:none">GenericValue</span><span data-if="dotnet" style="display:none">genericValue</span><span data-if="python" style="display:none">generic_value</span></code></i></a>
the values are passed at the corresponding index positions.
</p>
<p>Normally, none of the values needs to be changed.  A change should
only be applied in case of unsatisfying results of the automatic
determination of the initial components. The two parameters that can
be changed are <i><span data-if="hdevelop" style="display:inline">'merge_distance'</span><span data-if="c" style="display:none">"merge_distance"</span><span data-if="cpp" style="display:none">"merge_distance"</span><span data-if="com" style="display:none">"merge_distance"</span><span data-if="dotnet" style="display:none">"merge_distance"</span><span data-if="python" style="display:none">"merge_distance"</span></i> and
<i><span data-if="hdevelop" style="display:inline">'merge_fraction'</span><span data-if="c" style="display:none">"merge_fraction"</span><span data-if="cpp" style="display:none">"merge_fraction"</span><span data-if="com" style="display:none">"merge_fraction"</span><span data-if="dotnet" style="display:none">"merge_fraction"</span><span data-if="python" style="display:none">"merge_fraction"</span></i>; both are used during the iterative
merging of contour regions (see above).  First, the fraction of
contour pixels of one contour region that at most have a distance of
<i><span data-if="hdevelop" style="display:inline">'merge_distance'</span><span data-if="c" style="display:none">"merge_distance"</span><span data-if="cpp" style="display:none">"merge_distance"</span><span data-if="com" style="display:none">"merge_distance"</span><span data-if="dotnet" style="display:none">"merge_distance"</span><span data-if="python" style="display:none">"merge_distance"</span></i> from another contour region is computed. If
this fraction exceeds the value that is passed in
<i><span data-if="hdevelop" style="display:inline">'merge_fraction'</span><span data-if="c" style="display:none">"merge_fraction"</span><span data-if="cpp" style="display:none">"merge_fraction"</span><span data-if="com" style="display:none">"merge_fraction"</span><span data-if="dotnet" style="display:none">"merge_fraction"</span><span data-if="python" style="display:none">"merge_fraction"</span></i> the two contour regions are merged.
Consequently, the higher <i><span data-if="hdevelop" style="display:inline">'merge_distance'</span><span data-if="c" style="display:none">"merge_distance"</span><span data-if="cpp" style="display:none">"merge_distance"</span><span data-if="com" style="display:none">"merge_distance"</span><span data-if="dotnet" style="display:none">"merge_distance"</span><span data-if="python" style="display:none">"merge_distance"</span></i> and the lower
<i><span data-if="hdevelop" style="display:inline">'merge_fraction'</span><span data-if="c" style="display:none">"merge_fraction"</span><span data-if="cpp" style="display:none">"merge_fraction"</span><span data-if="com" style="display:none">"merge_fraction"</span><span data-if="dotnet" style="display:none">"merge_fraction"</span><span data-if="python" style="display:none">"merge_fraction"</span></i> is chosen the more contour regions are
merged. The default value of <i><span data-if="hdevelop" style="display:inline">'merge_distance'</span><span data-if="c" style="display:none">"merge_distance"</span><span data-if="cpp" style="display:none">"merge_distance"</span><span data-if="com" style="display:none">"merge_distance"</span><span data-if="dotnet" style="display:none">"merge_distance"</span><span data-if="python" style="display:none">"merge_distance"</span></i> is <i>5</i>
and the default value of <i><span data-if="hdevelop" style="display:inline">'merge_fraction'</span><span data-if="c" style="display:none">"merge_fraction"</span><span data-if="cpp" style="display:none">"merge_fraction"</span><span data-if="com" style="display:none">"merge_fraction"</span><span data-if="dotnet" style="display:none">"merge_fraction"</span><span data-if="python" style="display:none">"merge_fraction"</span></i> is <i>0.5</i>
(corresponds to 50 percent).
</p>
<p>When using the second possibility, i.e., the components of the
component model are approximately known, the training by using
<a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a> can be performed without previously
executing <code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code>. If this is desired, the
initial components can be specified by the user and directly passed
to <a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a>. Furthermore, if the components as
well as the relative movements (relations) of the components are
known, <code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code> as well as
<a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a> need not be executed. In fact, by
immediately passing the components as well as the relations to
<a href="create_component_model.html"><code><span data-if="hdevelop" style="display:inline">create_component_model</span><span data-if="c" style="display:none">create_component_model</span><span data-if="cpp" style="display:none">CreateComponentModel</span><span data-if="com" style="display:none">CreateComponentModel</span><span data-if="dotnet" style="display:none">CreateComponentModel</span><span data-if="python" style="display:none">create_component_model</span></code></a>, the component model can be created
without any training. In both cases, however,
<code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code> can be used to evaluate the effect of
the feature extraction parameters <a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a>,
<a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a>, and <a href="#MinSize"><i><code><span data-if="hdevelop" style="display:inline">MinSize</span><span data-if="c" style="display:none">MinSize</span><span data-if="cpp" style="display:none">MinSize</span><span data-if="com" style="display:none">MinSize</span><span data-if="dotnet" style="display:none">minSize</span><span data-if="python" style="display:none">min_size</span></code></i></a> of
<a href="train_model_components.html"><code><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></code></a> and <a href="create_component_model.html"><code><span data-if="hdevelop" style="display:inline">create_component_model</span><span data-if="c" style="display:none">create_component_model</span><span data-if="cpp" style="display:none">CreateComponentModel</span><span data-if="com" style="display:none">CreateComponentModel</span><span data-if="dotnet" style="display:none">CreateComponentModel</span><span data-if="python" style="display:none">create_component_model</span></code></a>,
and hence to find suitable parameter values for a certain
application.
</p>
<p>For this, the image regions for the (initial) components must be
explicitly given, i.e., for each (initial) component a separate
image from which the (initial) component should be created is
passed. In this case, <a href="#ModelImage"><i><code><span data-if="hdevelop" style="display:inline">ModelImage</span><span data-if="c" style="display:none">ModelImage</span><span data-if="cpp" style="display:none">ModelImage</span><span data-if="com" style="display:none">ModelImage</span><span data-if="dotnet" style="display:none">modelImage</span><span data-if="python" style="display:none">model_image</span></code></i></a> contains multiple image
objects. The domain of each image object is used as the region of
interest for calculating the corresponding (initial) component. The
image matrix of all image objects in the tuple must be identical,
i.e., <a href="#ModelImage"><i><code><span data-if="hdevelop" style="display:inline">ModelImage</span><span data-if="c" style="display:none">ModelImage</span><span data-if="cpp" style="display:none">ModelImage</span><span data-if="com" style="display:none">ModelImage</span><span data-if="dotnet" style="display:none">modelImage</span><span data-if="python" style="display:none">model_image</span></code></i></a> cannot be constructed in an arbitrary
manner using <a href="concat_obj.html"><code><span data-if="hdevelop" style="display:inline">concat_obj</span><span data-if="c" style="display:none">concat_obj</span><span data-if="cpp" style="display:none">ConcatObj</span><span data-if="com" style="display:none">ConcatObj</span><span data-if="dotnet" style="display:none">ConcatObj</span><span data-if="python" style="display:none">concat_obj</span></code></a>, but must be created from the same
image using <a href="add_channels.html"><code><span data-if="hdevelop" style="display:inline">add_channels</span><span data-if="c" style="display:none">add_channels</span><span data-if="cpp" style="display:none">AddChannels</span><span data-if="com" style="display:none">AddChannels</span><span data-if="dotnet" style="display:none">AddChannels</span><span data-if="python" style="display:none">add_channels</span></code></a> or equivalent calls. If this is not
the case, an error message is returned.  If the parameters
<a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a>, <a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a>, or <a href="#MinSize"><i><code><span data-if="hdevelop" style="display:inline">MinSize</span><span data-if="c" style="display:none">MinSize</span><span data-if="cpp" style="display:none">MinSize</span><span data-if="com" style="display:none">MinSize</span><span data-if="dotnet" style="display:none">minSize</span><span data-if="python" style="display:none">min_size</span></code></i></a>
only contain one element, this value is applied to the creation of
all (initial) components. In contrast, if different values for
different (initial) components should be used, tuples of values can
be passed for these three parameters. In this case, the tuples must
have a length that corresponds to the number of (initial)
components, i.e., the number of image objects in
<a href="#ModelImage"><i><code><span data-if="hdevelop" style="display:inline">ModelImage</span><span data-if="c" style="display:none">ModelImage</span><span data-if="cpp" style="display:none">ModelImage</span><span data-if="com" style="display:none">ModelImage</span><span data-if="dotnet" style="display:none">modelImage</span><span data-if="python" style="display:none">model_image</span></code></i></a>. The contour regions of the (initial) components
are returned in <a href="#InitialComponents"><i><code><span data-if="hdevelop" style="display:inline">InitialComponents</span><span data-if="c" style="display:none">InitialComponents</span><span data-if="cpp" style="display:none">InitialComponents</span><span data-if="com" style="display:none">InitialComponents</span><span data-if="dotnet" style="display:none">initialComponents</span><span data-if="python" style="display:none">initial_components</span></code></i></a>.
</p>
<p>Thus, the second possibility is equivalent to the function of
<a href="inspect_shape_model.html"><code><span data-if="hdevelop" style="display:inline">inspect_shape_model</span><span data-if="c" style="display:none">inspect_shape_model</span><span data-if="cpp" style="display:none">InspectShapeModel</span><span data-if="com" style="display:none">InspectShapeModel</span><span data-if="dotnet" style="display:none">InspectShapeModel</span><span data-if="python" style="display:none">inspect_shape_model</span></code></a> within the shape-based
matching. However, in contrast to <a href="inspect_shape_model.html"><code><span data-if="hdevelop" style="display:inline">inspect_shape_model</span><span data-if="c" style="display:none">inspect_shape_model</span><span data-if="cpp" style="display:none">InspectShapeModel</span><span data-if="com" style="display:none">InspectShapeModel</span><span data-if="dotnet" style="display:none">InspectShapeModel</span><span data-if="python" style="display:none">inspect_shape_model</span></code></a>,
<code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code> does not return the contour regions on
multiple image pyramid levels. Therefore, if the number of pyramid
levels to be used should be chosen manually, preferably
<a href="inspect_shape_model.html"><code><span data-if="hdevelop" style="display:inline">inspect_shape_model</span><span data-if="c" style="display:none">inspect_shape_model</span><span data-if="cpp" style="display:none">InspectShapeModel</span><span data-if="com" style="display:none">InspectShapeModel</span><span data-if="dotnet" style="display:none">InspectShapeModel</span><span data-if="python" style="display:none">inspect_shape_model</span></code></a> should be called individually for each
(initial) component.
</p>
<p>For both described possibilities the parameters
<a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a>, <a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a>, and <a href="#MinSize"><i><code><span data-if="hdevelop" style="display:inline">MinSize</span><span data-if="c" style="display:none">MinSize</span><span data-if="cpp" style="display:none">MinSize</span><span data-if="com" style="display:none">MinSize</span><span data-if="dotnet" style="display:none">minSize</span><span data-if="python" style="display:none">min_size</span></code></i></a>
can be automatically determined. If both hysteresis threshold should
be automatically determined, both <a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a> and
<a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a> must be set to <i><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></i>. In contrast,
if only one threshold value should be determined,
<a href="#ContrastLow"><i><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></i></a> must be set to <i><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></i> while
<a href="#ContrastHigh"><i><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></i></a> must be set to an arbitrary value different
from <i><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></i>.
</p>
<p>If the input image <a href="#ModelImage"><i><code><span data-if="hdevelop" style="display:inline">ModelImage</span><span data-if="c" style="display:none">ModelImage</span><span data-if="cpp" style="display:none">ModelImage</span><span data-if="com" style="display:none">ModelImage</span><span data-if="dotnet" style="display:none">modelImage</span><span data-if="python" style="display:none">model_image</span></code></i></a> has one channel the
representation of the model is created with the method that is used
in <a href="create_component_model.html"><code><span data-if="hdevelop" style="display:inline">create_component_model</span><span data-if="c" style="display:none">create_component_model</span><span data-if="cpp" style="display:none">CreateComponentModel</span><span data-if="com" style="display:none">CreateComponentModel</span><span data-if="dotnet" style="display:none">CreateComponentModel</span><span data-if="python" style="display:none">create_component_model</span></code></a> or
<a href="create_trained_component_model.html"><code><span data-if="hdevelop" style="display:inline">create_trained_component_model</span><span data-if="c" style="display:none">create_trained_component_model</span><span data-if="cpp" style="display:none">CreateTrainedComponentModel</span><span data-if="com" style="display:none">CreateTrainedComponentModel</span><span data-if="dotnet" style="display:none">CreateTrainedComponentModel</span><span data-if="python" style="display:none">create_trained_component_model</span></code></a> for the metrics
<i><span data-if="hdevelop" style="display:inline">'use_polarity'</span><span data-if="c" style="display:none">"use_polarity"</span><span data-if="cpp" style="display:none">"use_polarity"</span><span data-if="com" style="display:none">"use_polarity"</span><span data-if="dotnet" style="display:none">"use_polarity"</span><span data-if="python" style="display:none">"use_polarity"</span></i>, <i><span data-if="hdevelop" style="display:inline">'ignore_global_polarity'</span><span data-if="c" style="display:none">"ignore_global_polarity"</span><span data-if="cpp" style="display:none">"ignore_global_polarity"</span><span data-if="com" style="display:none">"ignore_global_polarity"</span><span data-if="dotnet" style="display:none">"ignore_global_polarity"</span><span data-if="python" style="display:none">"ignore_global_polarity"</span></i>, and
<i><span data-if="hdevelop" style="display:inline">'ignore_local_polarity'</span><span data-if="c" style="display:none">"ignore_local_polarity"</span><span data-if="cpp" style="display:none">"ignore_local_polarity"</span><span data-if="com" style="display:none">"ignore_local_polarity"</span><span data-if="dotnet" style="display:none">"ignore_local_polarity"</span><span data-if="python" style="display:none">"ignore_local_polarity"</span></i>.  If the input image has more than
one channel the representation is created with the method that is
used for the metric <i><span data-if="hdevelop" style="display:inline">'ignore_color_polarity'</span><span data-if="c" style="display:none">"ignore_color_polarity"</span><span data-if="cpp" style="display:none">"ignore_color_polarity"</span><span data-if="com" style="display:none">"ignore_color_polarity"</span><span data-if="dotnet" style="display:none">"ignore_color_polarity"</span><span data-if="python" style="display:none">"ignore_color_polarity"</span></i>.</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  <li>未经并行化处理。</li>
</ul>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="ModelImage" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ModelImage</span><span data-if="c" style="display:none">ModelImage</span><span data-if="cpp" style="display:none">ModelImage</span><span data-if="com" style="display:none">ModelImage</span><span data-if="dotnet" style="display:none">modelImage</span><span data-if="python" style="display:none">model_image</span></code></b> (input_object)  </span><span>(multichannel-)image(-array) <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject</span> (byte / uint2)</span>
</div>
<p class="pardesc">Input image from which the initial components should
be extracted.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="InitialComponents" class="parname"><b><code><span data-if="hdevelop" style="display:inline">InitialComponents</span><span data-if="c" style="display:none">InitialComponents</span><span data-if="cpp" style="display:none">InitialComponents</span><span data-if="com" style="display:none">InitialComponents</span><span data-if="dotnet" style="display:none">initialComponents</span><span data-if="python" style="display:none">initial_components</span></code></b> (output_object)  </span><span>region-array <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HRegion.html">HRegion</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HRegion.html">HRegion</a></span><span data-if="c" style="display:none">Hobject *</span></span>
</div>
<p class="pardesc">Contour regions of initial components.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="ContrastLow" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ContrastLow</span><span data-if="c" style="display:none">ContrastLow</span><span data-if="cpp" style="display:none">ContrastLow</span><span data-if="com" style="display:none">ContrastLow</span><span data-if="dotnet" style="display:none">contrastLow</span><span data-if="python" style="display:none">contrast_low</span></code></b> (input_control)  </span><span>integer(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[Union[int, str]]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Lower hysteresis threshold for the contrast of the
initial components in the image.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span>, 10, 20, 30, 40, 60, 80, 100, 120, 140, 160</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>ContrastLow &gt; 0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="ContrastHigh" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ContrastHigh</span><span data-if="c" style="display:none">ContrastHigh</span><span data-if="cpp" style="display:none">ContrastHigh</span><span data-if="com" style="display:none">ContrastHigh</span><span data-if="dotnet" style="display:none">contrastHigh</span><span data-if="python" style="display:none">contrast_high</span></code></b> (input_control)  </span><span>integer(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[Union[int, str]]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Upper hysteresis threshold for the contrast of the
initial components in the image.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span>, 10, 20, 30, 40, 60, 80, 100, 120, 140, 160</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>ContrastHigh &gt; 0 &amp;&amp; ContrastHigh &gt;= ContrastLow</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="MinSize" class="parname"><b><code><span data-if="hdevelop" style="display:inline">MinSize</span><span data-if="c" style="display:none">MinSize</span><span data-if="cpp" style="display:none">MinSize</span><span data-if="com" style="display:none">MinSize</span><span data-if="dotnet" style="display:none">minSize</span><span data-if="python" style="display:none">min_size</span></code></b> (input_control)  </span><span>integer(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[Union[int, str]]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Minimum size of the initial components.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span>, 0, 5, 10, 20, 30, 40</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>MinSize &gt;= 0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="Mode" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Mode</span><span data-if="c" style="display:none">Mode</span><span data-if="cpp" style="display:none">Mode</span><span data-if="com" style="display:none">Mode</span><span data-if="dotnet" style="display:none">mode</span><span data-if="python" style="display:none">mode</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Type of automatic segmentation.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'connection'</span>
    <span data-if="c" style="display:none">"connection"</span>
    <span data-if="cpp" style="display:none">"connection"</span>
    <span data-if="com" style="display:none">"connection"</span>
    <span data-if="dotnet" style="display:none">"connection"</span>
    <span data-if="python" style="display:none">"connection"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'connection'</span><span data-if="c" style="display:none">"connection"</span><span data-if="cpp" style="display:none">"connection"</span><span data-if="com" style="display:none">"connection"</span><span data-if="dotnet" style="display:none">"connection"</span><span data-if="python" style="display:none">"connection"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="GenericName" class="parname"><b><code><span data-if="hdevelop" style="display:inline">GenericName</span><span data-if="c" style="display:none">GenericName</span><span data-if="cpp" style="display:none">GenericName</span><span data-if="com" style="display:none">GenericName</span><span data-if="dotnet" style="display:none">genericName</span><span data-if="python" style="display:none">generic_name</span></code></b> (input_control)  </span><span>string(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[str]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Names of optional control parameters.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>[]</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'merge_distance'</span><span data-if="c" style="display:none">"merge_distance"</span><span data-if="cpp" style="display:none">"merge_distance"</span><span data-if="com" style="display:none">"merge_distance"</span><span data-if="dotnet" style="display:none">"merge_distance"</span><span data-if="python" style="display:none">"merge_distance"</span>, <span data-if="hdevelop" style="display:inline">'merge_fraction'</span><span data-if="c" style="display:none">"merge_fraction"</span><span data-if="cpp" style="display:none">"merge_fraction"</span><span data-if="com" style="display:none">"merge_fraction"</span><span data-if="dotnet" style="display:none">"merge_fraction"</span><span data-if="python" style="display:none">"merge_fraction"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="GenericValue" class="parname"><b><code><span data-if="hdevelop" style="display:inline">GenericValue</span><span data-if="c" style="display:none">GenericValue</span><span data-if="cpp" style="display:none">GenericValue</span><span data-if="com" style="display:none">GenericValue</span><span data-if="dotnet" style="display:none">genericValue</span><span data-if="python" style="display:none">generic_value</span></code></b> (input_control)  </span><span>number(-array) <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">MaybeSequence[Union[int, float]]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real / </span><span data-if="hdevelop" style="display:inline">integer)</span><span data-if="dotnet" style="display:none"> (<i>double</i> / </span><span data-if="dotnet" style="display:none">int / </span><span data-if="dotnet" style="display:none">long)</span><span data-if="cpp" style="display:none"> (<i>double</i> / </span><span data-if="cpp" style="display:none">Hlong)</span><span data-if="c" style="display:none"> (<i>double</i> / </span><span data-if="c" style="display:none">Hlong)</span></span>
</div>
<p class="pardesc">Values of optional control parameters.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>[]</p>
</div>
<h2 id="sec_example_all">例程 (HDevelop)</h2>
<pre class="example">
* First example that shows the use of gen_initial_components to automatically
* extract the initial components from a model image.

* Get the model image.
read_image (Image, 'model_image.tif')
* Define the entire model region.
gen_rectangle1 (ModelRegion, 119, 106, 330, 537)
reduce_domain (Image, ModelRegion, ModelImage)
* Automatically generate the initial components.
gen_initial_components (ModelImage, InitialComponents, 40, 40, 20, \
                        'connection', [], [])
* Extract the model components and train the relations.
train_model_components (ModelImage, InitialComponents, TrainingImages, \
                        ModelComponents, 40, 40, 20, 0.85, 0, 0, rad(15), \
                        'speed', 'rigidity', 0.2, 0.5, ComponentTrainingID)
* Create the component model based on the training result.
create_trained_component_model (ComponentTrainingID, -rad(30), rad(60), 10, \
                                0.8, 'auto', 'auto', 'none', \
                                'use_polarity', 'false', ComponentModelID, \
                                RootRanking)

* Second example that shows the use of gen_initial_components to evaluate
* the effect of the feature extraction parameters.

* Get the model image.
read_image (ModelImage, 'model_image.tif')
* Define the regions for the components.
gen_rectangle2 (ComponentRegions, 318, 109, -1.62, 34, 19)
gen_rectangle2 (Rectangle2, 342, 238, -1.63, 32, 17)
gen_rectangle2 (Rectangle3, 355, 505, 1.41, 25, 17)
concat_obj (ComponentRegions, Rectangle2, ComponentRegions)
concat_obj (ComponentRegions, Rectangle3, ComponentRegions)
add_channels (ComponentRegions, ModelImage, ModelImageReduced)
gen_initial_components (ModelImageReduced, InitialComponents, 15, 40, 15, \
                        'connection', [], [])
* Create the component model by explicitly specifying the relations.
create_component_model (ModelImage, ComponentRegions, 20, 20, rad(25), 0, \
                        rad(360), 15, 40, 15, 10, 0.8, 'auto', 'auto', \
                        'none', 'use_polarity', 'false', ComponentModelID, \
                        RootRanking)
</pre>
<h2 id="sec_result">结果</h2>
<p>If the parameter values are correct, 该算子
<code><span data-if="hdevelop" style="display:inline">gen_initial_components</span><span data-if="c" style="display:none">gen_initial_components</span><span data-if="cpp" style="display:none">GenInitialComponents</span><span data-if="com" style="display:none">GenInitialComponents</span><span data-if="dotnet" style="display:none">GenInitialComponents</span><span data-if="python" style="display:none">gen_initial_components</span></code> 返回值 <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
    .  If the input
is empty (no input images are available) the behavior can be set via
<a href="set_system.html"><code><span data-if="hdevelop" style="display:inline">set_system('no_object_result',&lt;Result&gt;)</span><span data-if="c" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span><span data-if="cpp" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="com" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="dotnet" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="python" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span></code></a>.  If necessary, an
exception is raised.</p>
<h2 id="sec_predecessors">可能的前置算子</h2>
<p>
<code><a href="draw_region.html"><span data-if="hdevelop" style="display:inline">draw_region</span><span data-if="c" style="display:none">draw_region</span><span data-if="cpp" style="display:none">DrawRegion</span><span data-if="com" style="display:none">DrawRegion</span><span data-if="dotnet" style="display:none">DrawRegion</span><span data-if="python" style="display:none">draw_region</span></a></code>, 
<code><a href="add_channels.html"><span data-if="hdevelop" style="display:inline">add_channels</span><span data-if="c" style="display:none">add_channels</span><span data-if="cpp" style="display:none">AddChannels</span><span data-if="com" style="display:none">AddChannels</span><span data-if="dotnet" style="display:none">AddChannels</span><span data-if="python" style="display:none">add_channels</span></a></code>, 
<code><a href="reduce_domain.html"><span data-if="hdevelop" style="display:inline">reduce_domain</span><span data-if="c" style="display:none">reduce_domain</span><span data-if="cpp" style="display:none">ReduceDomain</span><span data-if="com" style="display:none">ReduceDomain</span><span data-if="dotnet" style="display:none">ReduceDomain</span><span data-if="python" style="display:none">reduce_domain</span></a></code>
</p>
<h2 id="sec_successors">可能的后置算子</h2>
<p>
<code><a href="train_model_components.html"><span data-if="hdevelop" style="display:inline">train_model_components</span><span data-if="c" style="display:none">train_model_components</span><span data-if="cpp" style="display:none">TrainModelComponents</span><span data-if="com" style="display:none">TrainModelComponents</span><span data-if="dotnet" style="display:none">TrainModelComponents</span><span data-if="python" style="display:none">train_model_components</span></a></code>
</p>
<h2 id="sec_alternatives">可替代算子</h2>
<p>
<code><a href="inspect_shape_model.html"><span data-if="hdevelop" style="display:inline">inspect_shape_model</span><span data-if="c" style="display:none">inspect_shape_model</span><span data-if="cpp" style="display:none">InspectShapeModel</span><span data-if="com" style="display:none">InspectShapeModel</span><span data-if="dotnet" style="display:none">InspectShapeModel</span><span data-if="python" style="display:none">inspect_shape_model</span></a></code>
</p>
<h2 id="sec_module">模块</h2>
<p>
Matching</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
